\hypertarget{classCRiffWaveWriter}{
\section{\-C\-Riff\-Wave\-Writer \-Class \-Reference}
\label{classCRiffWaveWriter}\index{\-C\-Riff\-Wave\-Writer@{\-C\-Riff\-Wave\-Writer}}
}


{\ttfamily \#include $<$riff\-\_\-wave\-\_\-writer.\-h$>$}

\subsection*{\-Classes}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structCRiffWaveWriter_1_1SDataChunk}{\-S\-Data\-Chunk}
\item 
struct \hyperlink{structCRiffWaveWriter_1_1SFormatChunk}{\-S\-Format\-Chunk}
\end{DoxyCompactItemize}
\subsection*{\-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classCRiffWaveWriter_aa53741b339e618387b8f763cfad3d521}{\-C\-Riff\-Wave\-Writer} ()
\item 
virtual \hyperlink{classCRiffWaveWriter_ae0a0d8ebe1dacf1693e010d048b60bb1}{$\sim$\-C\-Riff\-Wave\-Writer} ()
\item 
bool \hyperlink{classCRiffWaveWriter_a9df878bb108ed772c51d86f9bd7623d5}{create} (std\-::string p\-Filename, \hyperlink{namespaceNWaveFormatTag_a984a591ddf2ea06019b5881d5b83364d}{\-N\-Wave\-Format\-Tag\-::\-E\-Format\-Tag} p\-Format\-Tag, uint16\-\_\-t p\-Channels, uint32\-\_\-t p\-Samples\-Per\-Second, uint16\-\_\-t p\-Bits\-Per\-Sample, bool p\-Overwrite)
\item 
bool \hyperlink{classCRiffWaveWriter_a7a7346ea4390c7c1d47de30a9d77daf1}{close} ()
\item 
bool \hyperlink{classCRiffWaveWriter_a96ca87814699a4fedb3788aff1d7f344}{sync} ()
\item 
std\-::string \hyperlink{classCRiffWaveWriter_a45143c51ce3291bbcd28b4f50bd75ebf}{get\-Wave\-Info} ()
\item 
unsigned int \hyperlink{classCRiffWaveWriter_ac1cb8527f81dfc4bc8d9fd687b598b65}{sample\-Count} ()
\item 
unsigned int \hyperlink{classCRiffWaveWriter_aa92494e4e8aa940c690547a5d146bb0a}{channels} ()
\item 
unsigned int \hyperlink{classCRiffWaveWriter_a5074261cb6ae4a1e9a8b401a4045328e}{byte\-Per\-Sample} ()
\item 
unsigned int \hyperlink{classCRiffWaveWriter_aaa2ebde31d156e23ea6f1b4ad3202c27}{write\-Samples} (void $\ast$p\-Samples, unsigned int p\-Count)
\end{DoxyCompactItemize}
\subsection*{\-Private \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
bool \hyperlink{classCRiffWaveWriter_a15cbe18ad4bc7cf8857aa038c633e919}{write\-Chunks} ()
\end{DoxyCompactItemize}
\subsection*{\-Private \-Attributes}
\begin{DoxyCompactItemize}
\item 
std\-::ofstream \hyperlink{classCRiffWaveWriter_a442fa1e496142cb99c240a6e21ff3fff}{m\-Wav}
\item 
uint32\-\_\-t \hyperlink{classCRiffWaveWriter_a3ee71d7cc7e9cadc91440d38b21f0423}{m\-Riff\-Chunksize}
\item 
struct \*
\hyperlink{structCRiffWaveWriter_1_1SFormatChunk}{\-C\-Riff\-Wave\-Writer\-::\-S\-Format\-Chunk} \hyperlink{classCRiffWaveWriter_a46a1d2c07c8488ef3de12a6baf46ae62}{m\-Format}
\item 
struct \hyperlink{structCRiffWaveWriter_1_1SDataChunk}{\-C\-Riff\-Wave\-Writer\-::\-S\-Data\-Chunk} \hyperlink{classCRiffWaveWriter_a97db304507830c6f38da38d431b102ca}{m\-Data}
\end{DoxyCompactItemize}


\subsection{\-Constructor \& \-Destructor \-Documentation}
\hypertarget{classCRiffWaveWriter_aa53741b339e618387b8f763cfad3d521}{
\index{\-C\-Riff\-Wave\-Writer@{\-C\-Riff\-Wave\-Writer}!\-C\-Riff\-Wave\-Writer@{\-C\-Riff\-Wave\-Writer}}
\index{\-C\-Riff\-Wave\-Writer@{\-C\-Riff\-Wave\-Writer}!CRiffWaveWriter@{\-C\-Riff\-Wave\-Writer}}
\subsubsection[{\-C\-Riff\-Wave\-Writer}]{\setlength{\rightskip}{0pt plus 5cm}\-C\-Riff\-Wave\-Writer\-::\-C\-Riff\-Wave\-Writer (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classCRiffWaveWriter_aa53741b339e618387b8f763cfad3d521}
\hypertarget{classCRiffWaveWriter_ae0a0d8ebe1dacf1693e010d048b60bb1}{
\index{\-C\-Riff\-Wave\-Writer@{\-C\-Riff\-Wave\-Writer}!$\sim$\-C\-Riff\-Wave\-Writer@{$\sim$\-C\-Riff\-Wave\-Writer}}
\index{$\sim$\-C\-Riff\-Wave\-Writer@{$\sim$\-C\-Riff\-Wave\-Writer}!CRiffWaveWriter@{\-C\-Riff\-Wave\-Writer}}
\subsubsection[{$\sim$\-C\-Riff\-Wave\-Writer}]{\setlength{\rightskip}{0pt plus 5cm}\-C\-Riff\-Wave\-Writer\-::$\sim$\-C\-Riff\-Wave\-Writer (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classCRiffWaveWriter_ae0a0d8ebe1dacf1693e010d048b60bb1}


\subsection{\-Member \-Function \-Documentation}
\hypertarget{classCRiffWaveWriter_a5074261cb6ae4a1e9a8b401a4045328e}{
\index{\-C\-Riff\-Wave\-Writer@{\-C\-Riff\-Wave\-Writer}!byte\-Per\-Sample@{byte\-Per\-Sample}}
\index{byte\-Per\-Sample@{byte\-Per\-Sample}!CRiffWaveWriter@{\-C\-Riff\-Wave\-Writer}}
\subsubsection[{byte\-Per\-Sample}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int \-C\-Riff\-Wave\-Writer\-::byte\-Per\-Sample (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classCRiffWaveWriter_a5074261cb6ae4a1e9a8b401a4045328e}
\-Alignment of one sample. \hypertarget{classCRiffWaveWriter_aa92494e4e8aa940c690547a5d146bb0a}{
\index{\-C\-Riff\-Wave\-Writer@{\-C\-Riff\-Wave\-Writer}!channels@{channels}}
\index{channels@{channels}!CRiffWaveWriter@{\-C\-Riff\-Wave\-Writer}}
\subsubsection[{channels}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int \-C\-Riff\-Wave\-Writer\-::channels (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classCRiffWaveWriter_aa92494e4e8aa940c690547a5d146bb0a}
\-Get number of channels. \-Would be return 1 for mono and 2 for stereo.

\begin{DoxyReturn}{\-Returns}
\-Number of channels. 
\end{DoxyReturn}
\hypertarget{classCRiffWaveWriter_a7a7346ea4390c7c1d47de30a9d77daf1}{
\index{\-C\-Riff\-Wave\-Writer@{\-C\-Riff\-Wave\-Writer}!close@{close}}
\index{close@{close}!CRiffWaveWriter@{\-C\-Riff\-Wave\-Writer}}
\subsubsection[{close}]{\setlength{\rightskip}{0pt plus 5cm}bool \-C\-Riff\-Wave\-Writer\-::close (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classCRiffWaveWriter_a7a7346ea4390c7c1d47de30a9d77daf1}
\-Close wav file.

\begin{DoxyReturn}{\-Returns}
\-True for success. 
\end{DoxyReturn}
\hypertarget{classCRiffWaveWriter_a9df878bb108ed772c51d86f9bd7623d5}{
\index{\-C\-Riff\-Wave\-Writer@{\-C\-Riff\-Wave\-Writer}!create@{create}}
\index{create@{create}!CRiffWaveWriter@{\-C\-Riff\-Wave\-Writer}}
\subsubsection[{create}]{\setlength{\rightskip}{0pt plus 5cm}bool \-C\-Riff\-Wave\-Writer\-::create (
\begin{DoxyParamCaption}
\item[{std\-::string}]{p\-Filename, }
\item[{{\bf \-N\-Wave\-Format\-Tag\-::\-E\-Format\-Tag}}]{p\-Format\-Tag, }
\item[{uint16\-\_\-t}]{p\-Channels, }
\item[{uint32\-\_\-t}]{p\-Samples\-Per\-Second, }
\item[{uint16\-\_\-t}]{p\-Bits\-Per\-Sample, }
\item[{bool}]{p\-Overwrite}
\end{DoxyParamCaption}
)}}
\label{classCRiffWaveWriter_a9df878bb108ed772c51d86f9bd7623d5}
\-Create a new \-R\-I\-F\-F \-W\-A\-V\-E file. \-If the wav file already exist and p\-Overwrite is false then the methode create will fail. \-If p\-Overwrite is true then a existing wav file will be erased.

block\-Align = p\-Channels $\ast$ ((p\-Bits\-Per\-Sample + 7) / 8) \hypertarget{classCRiffWaveWriter_a45143c51ce3291bbcd28b4f50bd75ebf}{
\index{\-C\-Riff\-Wave\-Writer@{\-C\-Riff\-Wave\-Writer}!get\-Wave\-Info@{get\-Wave\-Info}}
\index{get\-Wave\-Info@{get\-Wave\-Info}!CRiffWaveWriter@{\-C\-Riff\-Wave\-Writer}}
\subsubsection[{get\-Wave\-Info}]{\setlength{\rightskip}{0pt plus 5cm}string \-C\-Riff\-Wave\-Writer\-::get\-Wave\-Info (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classCRiffWaveWriter_a45143c51ce3291bbcd28b4f50bd75ebf}
\-Get information about the opened wav file.

\begin{DoxyReturn}{\-Returns}
\-String which contains the infos. 
\end{DoxyReturn}
\hypertarget{classCRiffWaveWriter_ac1cb8527f81dfc4bc8d9fd687b598b65}{
\index{\-C\-Riff\-Wave\-Writer@{\-C\-Riff\-Wave\-Writer}!sample\-Count@{sample\-Count}}
\index{sample\-Count@{sample\-Count}!CRiffWaveWriter@{\-C\-Riff\-Wave\-Writer}}
\subsubsection[{sample\-Count}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int \-C\-Riff\-Wave\-Writer\-::sample\-Count (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classCRiffWaveWriter_ac1cb8527f81dfc4bc8d9fd687b598b65}
\-Return count of samples. \-If the wave file has two channels then the value is the count of both channels.

\begin{DoxyReturn}{\-Returns}
\-Count of samples from all channels 
\end{DoxyReturn}
\hypertarget{classCRiffWaveWriter_a96ca87814699a4fedb3788aff1d7f344}{
\index{\-C\-Riff\-Wave\-Writer@{\-C\-Riff\-Wave\-Writer}!sync@{sync}}
\index{sync@{sync}!CRiffWaveWriter@{\-C\-Riff\-Wave\-Writer}}
\subsubsection[{sync}]{\setlength{\rightskip}{0pt plus 5cm}bool \-C\-Riff\-Wave\-Writer\-::sync (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classCRiffWaveWriter_a96ca87814699a4fedb3788aff1d7f344}
\-Save the correct chunk size for the \-R\-I\-F\-F chunk and data chunk to the wav file. \hypertarget{classCRiffWaveWriter_a15cbe18ad4bc7cf8857aa038c633e919}{
\index{\-C\-Riff\-Wave\-Writer@{\-C\-Riff\-Wave\-Writer}!write\-Chunks@{write\-Chunks}}
\index{write\-Chunks@{write\-Chunks}!CRiffWaveWriter@{\-C\-Riff\-Wave\-Writer}}
\subsubsection[{write\-Chunks}]{\setlength{\rightskip}{0pt plus 5cm}bool \-C\-Riff\-Wave\-Writer\-::write\-Chunks (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classCRiffWaveWriter_a15cbe18ad4bc7cf8857aa038c633e919}
\hypertarget{classCRiffWaveWriter_aaa2ebde31d156e23ea6f1b4ad3202c27}{
\index{\-C\-Riff\-Wave\-Writer@{\-C\-Riff\-Wave\-Writer}!write\-Samples@{write\-Samples}}
\index{write\-Samples@{write\-Samples}!CRiffWaveWriter@{\-C\-Riff\-Wave\-Writer}}
\subsubsection[{write\-Samples}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int \-C\-Riff\-Wave\-Writer\-::write\-Samples (
\begin{DoxyParamCaption}
\item[{void $\ast$}]{p\-Samples, }
\item[{unsigned int}]{p\-Count}
\end{DoxyParamCaption}
)}}
\label{classCRiffWaveWriter_aaa2ebde31d156e23ea6f1b4ad3202c27}
\-Write a count of samples into the wav file. \-If the wav file has to channels then the samples must be ordered like \-C\-H1, \-C\-H2, \-C\-H1, \-C\-H2, \-C\-H1, ... and so on.


\begin{DoxyParams}{\-Parameters}
{\em p\-Samples} & \-Array for samples which should be written. \\
\hline
{\em p\-Count} & \-Count of samples (unit\-: 1 sample). \\
\hline
{\em p\-Count} & \-Count of samples which should be written (unit\-: 1 sample). \-Array p\-Samples must has a least p\-Count elements. \-One element is equal one sample and must have the size of \hyperlink{classCRiffWaveWriter_a5074261cb6ae4a1e9a8b401a4045328e}{byte\-Per\-Sample()}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{\-Returns}
\-Count of written samples. 
\end{DoxyReturn}


\subsection{\-Member \-Data \-Documentation}
\hypertarget{classCRiffWaveWriter_a97db304507830c6f38da38d431b102ca}{
\index{\-C\-Riff\-Wave\-Writer@{\-C\-Riff\-Wave\-Writer}!m\-Data@{m\-Data}}
\index{m\-Data@{m\-Data}!CRiffWaveWriter@{\-C\-Riff\-Wave\-Writer}}
\subsubsection[{m\-Data}]{\setlength{\rightskip}{0pt plus 5cm}struct {\bf \-C\-Riff\-Wave\-Writer\-::\-S\-Data\-Chunk}  {\bf \-C\-Riff\-Wave\-Writer\-::m\-Data}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classCRiffWaveWriter_a97db304507830c6f38da38d431b102ca}
\hypertarget{classCRiffWaveWriter_a46a1d2c07c8488ef3de12a6baf46ae62}{
\index{\-C\-Riff\-Wave\-Writer@{\-C\-Riff\-Wave\-Writer}!m\-Format@{m\-Format}}
\index{m\-Format@{m\-Format}!CRiffWaveWriter@{\-C\-Riff\-Wave\-Writer}}
\subsubsection[{m\-Format}]{\setlength{\rightskip}{0pt plus 5cm}struct {\bf \-C\-Riff\-Wave\-Writer\-::\-S\-Format\-Chunk}  {\bf \-C\-Riff\-Wave\-Writer\-::m\-Format}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classCRiffWaveWriter_a46a1d2c07c8488ef3de12a6baf46ae62}
\hypertarget{classCRiffWaveWriter_a3ee71d7cc7e9cadc91440d38b21f0423}{
\index{\-C\-Riff\-Wave\-Writer@{\-C\-Riff\-Wave\-Writer}!m\-Riff\-Chunksize@{m\-Riff\-Chunksize}}
\index{m\-Riff\-Chunksize@{m\-Riff\-Chunksize}!CRiffWaveWriter@{\-C\-Riff\-Wave\-Writer}}
\subsubsection[{m\-Riff\-Chunksize}]{\setlength{\rightskip}{0pt plus 5cm}uint32\-\_\-t {\bf \-C\-Riff\-Wave\-Writer\-::m\-Riff\-Chunksize}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classCRiffWaveWriter_a3ee71d7cc7e9cadc91440d38b21f0423}
\hypertarget{classCRiffWaveWriter_a442fa1e496142cb99c240a6e21ff3fff}{
\index{\-C\-Riff\-Wave\-Writer@{\-C\-Riff\-Wave\-Writer}!m\-Wav@{m\-Wav}}
\index{m\-Wav@{m\-Wav}!CRiffWaveWriter@{\-C\-Riff\-Wave\-Writer}}
\subsubsection[{m\-Wav}]{\setlength{\rightskip}{0pt plus 5cm}std\-::ofstream {\bf \-C\-Riff\-Wave\-Writer\-::m\-Wav}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classCRiffWaveWriter_a442fa1e496142cb99c240a6e21ff3fff}


\-The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
\hyperlink{riff__wave__writer_8h}{riff\-\_\-wave\-\_\-writer.\-h}\item 
\hyperlink{riff__wave__writer_8cxx}{riff\-\_\-wave\-\_\-writer.\-cxx}\end{DoxyCompactItemize}
